package com.inifitness.admin.core.system.converter;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.inifitness.admin.core.system.model.dto.EventParamDTO;
import com.inifitness.admin.core.system.model.entity.SysEventParam;
import com.inifitness.admin.core.system.model.form.EventParamForm;
import com.inifitness.admin.core.system.model.vo.EventParamPageVO;
import com.inifitness.common.model.Option;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 系统管理-事件参数转换类
 *
 * @author
 * @since 2024-05-31 13:46:16
 */

@Mapper(componentModel = "spring")
public interface EventParamConvert {

  EventParamPageVO bo2Vo(SysEventParam bo);

  Page<EventParamPageVO> entity2Page(Page<SysEventParam> page);

  @Mapping(target = "value", source = "id")
  @Mapping(target = "label", source = "label")
  Option<Long> entity2Option(SysEventParam entity);

  List<Option<Long>> entities2Options(List<SysEventParam> entities);

  SysEventParam form2Entity(EventParamForm form);

  EventParamForm entity2Form(SysEventParam entity);

  EventParamDTO entity2dto(SysEventParam entity);
}
